<?php 
//Manage input to this file first - reload if necessarry
require_once 'db_config.php';

$db = new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_DATABASE);

// Get the questions from the database
$result=mysqli_query($db,"SELECT * FROM question ORDER BY parent") or die('Error getting questions from database.');
$qestions=array();
while($questions[]=mysqli_fetch_assoc($result)) {}
unset($questions[count($questions)-1]);
mysqli_free_result($result);
mysqli_close($db);

require_once 'admin.tpl.php';
?>

